package com.zzl.finance.data.controller;

import com.zzl.apidoc.annotation.ApidocController;
import com.zzl.apidoc.annotation.ApidocOperation;
import com.zzl.finance.data.dto.EnterpriseFinancialProductDto;
import com.zzl.finance.data.service.EnterpriseFinancialProductService;
import com.zzl.general.common.apidoc.annotation.ApidocParamsPage;
import com.zzl.general.common.apidoc.annotation.ApidocReturnPage;
import com.zzl.general.common.ctrl.WebBaseCtrl;
import com.zzl.general.common.utils.PageUtils;
import com.zzl.general.common.utils.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 金融产品
 *
 * @author wztsl
 * @date 2021-12-22 16:56:38
 */
@ApidocController("企业金融产品")
@RestController
@RequestMapping("data/enterpriseFinancialProduct")
@Slf4j
@SuppressWarnings("unused")
public class EnterpriseFinancialProductController extends WebBaseCtrl {
    @SuppressWarnings("all")
    @Autowired
    private EnterpriseFinancialProductService enterpriseFinancialProductService;

    /**
     * 列表
     */
    @GetMapping("/list")
    @ApidocOperation(description = "分页查询企业服务费配置", operationId = "data/enterpriseFinancialProduct/list")
    @ApidocReturnPage(genericTypeClass = EnterpriseFinancialProductDto.class)
    public Result list(@ApidocParamsPage(name = "params",
            keyName = {"keywords","financialProductId"},
            keyDescription = {"企业名称","金融产品id"})
                           @RequestParam Map<String, Object> params) {
        PageUtils page = enterpriseFinancialProductService.queryPage(params);
        return Result.ok().put("page", page);
    }
}
